package com.org.myapplication.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Button;

import com.org.myapplication.Manager.VL53L5CXServiceManager;
import com.org.myapplication.R;

public class ZoomActivity extends AppCompatActivity {
    Button bt_zoom_in, bt_zoom_out;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zoom);
        bt_zoom_in = findViewById(R.id.bt_zoom_in);
        bt_zoom_out = findViewById(R.id.bt_zoom_out);
        VL53L5CXServiceManager.getInstance(this).fun_srceen_zoom(0, 1920.0, 1080.0);
    }

    @Override
    protected void onResume() {
        super.onResume();
        bt_zoom_in.setOnClickListener(view -> {
            VL53L5CXServiceManager.getInstance(this).fun_srceen_zoom(1, 1920.0, 1080.0);
        });
        bt_zoom_out.setOnClickListener(view -> {
            VL53L5CXServiceManager.getInstance(this).fun_srceen_zoom(2, 1920.0, 1080.0);
        });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        VL53L5CXServiceManager.getInstance(this).fun_srceen_zoom(3, 1920.0, 1080.0);
    }
}